<template>
  <div
    class="productList productList2"
    ref="container"
    :height="height"
    v-wechat-title="this.pageTitle"
  >
    <div class="allTitleDiv" ref="titleBarHeight">
      <div class="titleBar" id="titleBar">
        <p :class="{ active: titleType == '1' }" @click="changeTitleType('1')">
          我的商品
        </p>
        <p :class="{ active: titleType == '0' }" @click="changeTitleType('0')">
          选货中心
        </p>
        <p :class="{ active: titleType == '3' }" @click="changeTitleType('3')">
          订单中心
        </p>
      </div>
      <!-- <div class="swiper-container" id="tabSwiper">
              <div class="swiper-wrapper">
                <div class="swiper-slide"  v-for="(oneTab,index) in tabList"  :key="index">
                  
                </div>
              </div>
            </div> -->

      <div class="erjiTab" v-show="titleType == '1' || titleType == '0'">
        <swiper class="swiper-wrapper" :options="ProductConSwiper">
          <swiper-slide
            class="swiper-slide"
            v-for="(item, index) in tabList"
            :key="index"
            ref="goodSwiper"
          >
            <div class="oneTabs" @click="changetabType(item.cate_id)">
              <p :class="{ active: item.ischecked }">{{ item.cate_name }}</p>
              <span v-show="item.ischecked"></span>
            </div>
          </swiper-slide>
        </swiper>
      </div>
      <div class="goodsNumDiv" v-show="titleType == '1' || titleType == '0'">
        <p class="leftshouNum" v-show="titleType == '1'">
          共 <span>{{ allGoodsNum }}</span> 个商品
        </p>
        <div class="sort_div" v-show="titleType == '0'">
          <div class="one_sort" @click="changePriceType">
            <p>价格</p>
            <img
              v-show="priceType == '1'"
              class="nocheck"
              src="@assets/images/noCheck.png"
              alt=""
            />
            <img
              v-show="priceType == '3'"
              class="checked"
              src="@assets/images/checkBottom.png"
              alt=""
            />
            <img
              v-show="priceType == '2'"
              class="checked"
              src="@assets/images/checkTop.png"
              alt=""
            />
          </div>
          <div class="one_sort" @click="changePriceTypeGet">
            <p>佣金</p>
            <img
              v-show="priceTypeGet == '1'"
              class="nocheck"
              src="@assets/images/noCheck.png"
              alt=""
            />
            <img
              v-show="priceTypeGet == '3'"
              class="checked"
              src="@assets/images/checkBottom.png"
              alt=""
            />
            <img
              v-show="priceTypeGet == '2'"
              class="checked"
              src="@assets/images/checkTop.png"
              alt=""
            />
          </div>
        </div>
        <p
          class="manage"
          v-show="titleType == '1' || titleType == '0'"
          @click="changeManageType"
        >
          管理
        </p>
        <p
          class="manage"
          v-show="titleType != '3' && isallChecked == false && managetype"
          @click="allChecked"
        >
          全选
        </p>
        <p
          class="manage"
          v-show="titleType != '3' && isallChecked && managetype"
          @click="allChecked"
        >
          完成
        </p>
        <img
          style="float:right;width:0.44rem;height:0.44rem;margin:0.24rem 0.1rem 0 0;"
          v-show="titleType != '3' && isallChecked && managetype"
          @click="allChecked"
          class="img"
          src="@assets/images/checked1.png"
          alt=""
        />
      </div>
      <div class="allMoney" v-show="titleType == '3'">
        <div class="newBeansTop">
          <div class="isContainer">
            <p style="font-weight:500;">
              <span>我的分成金额</span>
              <img @click="showAlert()" src="@assets/images/help1.png" alt="" />
            </p>
            <p class="real">
              <span>{{ realBeansum }}</span>
              <span style="font-size:.34rem;">元</span>
            </p>
          </div>

          <!-- <div class="isRecord" @click="toRecord('7')">交易记录</div> -->
        </div>
      </div>
    </div>

    <div
      class="goodsListDiv"
      ref="pullRefresh"
      style="position:relative;overflow:hidden;"
      v-show="titleType == '1' || titleType == '0'"
      :style="{ height: scrollDivHeight }"
    >
      <p
        @click="addNewGoods()"
        v-if="bottomShow && showNewGoods && titleType == '1'"
        style="position:absolute;bottom:0.72rem;left:0.3rem;width:6.9rem;text-align:center;background:rgba(255, 50, 62, 1);color:#fff;line-height:1;font-size:0.3rem;padding:0.29rem 0;border-radius:0.16rem;z-index:10;"
      >
        推荐商品
      </p>
      <scroller
        :on-infinite="infinite"
        :on-refresh="refresh"
        ref="my_scroller1"
      >
        <!-- <p  @click="addNewGoods()" >添加</p> -->
        <div
          style="width:100%;height:100%;"
          v-if="showNewGoods && titleType == '1'"
        >
          <img
            style="position:absolute;top:4rem;left:1.76rem;width:4rem;"
            src="@assets/images/noCollection.png"
            alt=""
            srcset=""
          />
        </div>
        <div
          style="width:100%;height:100%;"
          v-if="showNewGoods && titleType == '0'"
        >
          <img
            style="position:absolute;top:4rem;left:1.76rem;width:4rem;"
            src="@assets/images/noCollection.png"
            alt=""
            srcset=""
          />
        </div>
        <div
          class="list acea-row row-between-wrapper"
          :class="Switch === true ? '' : 'on'"
          ref="list"
        >
          <div
            v-for="(item, index) in productList"
            :key="index"
            class="item"
            :class="cantClick === true ? 'cantClick' : ''"
            :title="item.store_name"
            ref="item"
          >
            <div class="pictrue" :class="Switch === true ? '' : 'on'">
              <img
                @click="goDetail(item)"
                v-if="item.is_seckill == '1'"
                :src="item.seckill.image"
                :class="Switch === true ? '' : 'on'"
              />
              <img
                @click="goDetail(item)"
                v-if="item.is_seckill == '0'"
                :src="item.image"
                :class="Switch === true ? '' : 'on'"
              />
              <img
                v-if="managetype && item.ischecked == true"
                @click="changeCheckedType(item)"
                class="img"
                src="@assets/images/checked1.png"
                alt=""
              />
              <img
                v-if="managetype && item.ischecked == false"
                @click="changeCheckedType(item)"
                class="img"
                src="@assets/images/checkedNo.png"
                alt=""
              />
              <span
                class="pictrue_log_class"
                :class="Switch === true ? 'pictrue_log_big' : 'pictrue_log'"
                v-if="item.activity && item.activity.type === '1'"
                >秒杀</span
              >
              <span
                class="pictrue_log_class"
                :class="Switch === true ? 'pictrue_log_big' : 'pictrue_log'"
                v-if="item.activity && item.activity.type === '2'"
                >砍价</span
              >

              <span
                class="pictrue_log_class"
                :class="Switch === true ? 'pictrue_log_big' : 'pictrue_log'"
                v-if="item.activity && item.activity.type === '3'"
                >拼团</span
              >
              <span
                style="width:1.48rem;height:0.48rem;position: absolute;right:0;top:0;"
                v-show="item.is_seckill == '1'"
                class=" free_buy"
              >
                <img
                  style="border-radius:0;"
                  src="@assets/images/seckill.png"
                  alt=""
                />
              </span>
              <span
                style="width:1.48rem;height:0.48rem;position: absolute;right:0;top:0;"
                v-show="item.is_free == '1'"
                class=" free_buy"
              >
                <img
                  style="border-radius:0;"
                  src="@assets/images/freeBay.png"
                  alt=""
                />
              </span>
            </div>
            <div class="text" :class="Switch === true ? '' : 'on'">
              <div
                v-if="item.is_seckill == '1'"
                class="name line1"
                style="height:0.72rem;"
              >
                <!-- <span  style="padding: 0.02rem 0.06rem;border-radius: 0.04rem;margin-right: 0.08rem;height: auto;border: 0.02rem solid rgba(255,35,35,0.38);font-size: 0.24rem;font-weight: 400;color: rgba(255,35,35,0.78);line-height: 1;">{{item.seckill.countTime}}</span> -->
                {{ item.seckill.title }}
              </div>
              <div
                v-if="item.is_seckill == '0'"
                class="name line1"
                style="height:0.72rem;"
              >
                {{ item.store_name }}
              </div>
              <div
                v-show="titleType == '1'"
                class="vip acea-row row-between-wrapper"
                :class="titleType == '1' ? 'flexStart' : ''"
              >
                <div
                  class="vip-money font-color-red"
                  v-show="item.is_free == '0' && item.is_seckill == '0'"
                >
                  ￥<span style="font-size:0.3rem;">{{
                    item.price.split(".")[0]
                  }}</span
                  >.{{ item.price.split(".")[1] }}
                </div>
                <div
                  class="vip-money font-color-red"
                  v-if="item.is_seckill == '1'"
                >
                  ￥<span style="font-size:0.3rem;">{{
                    item.seckill.price.split(".")[0]
                  }}</span
                  >.{{ item.seckill.price.split(".")[1] }}
                </div>

                <div
                  class="vip-money font-color-red"
                  v-show="item.is_free == '1' && item.is_seckill == '0'"
                >
                  ￥<span style="font-size:0.3rem;">0</span>.00
                </div>
                <div class="flexDiv" v-show="item.is_free == '0'">
                  <img src="@assets/images/havemoney.png" alt="" />
                  <span>￥{{ item.brokerage }}</span>
                </div>
              </div>
              <div class="allMai" v-show="titleType == '1'">
                <div
                  class="allbuy"
                  v-if="
                    item.sales == undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售0 {{ item.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales != undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售{{ item.sales + item.ficti }} {{ item.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales != undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售{{ item.sales }} {{ item.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales == undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售{{ item.ficti }} {{ item.unit_name }}
                </div>

                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales == undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售0 {{ item.seckill.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales != undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售{{ item.seckill.sales + item.ficti }}
                  {{ item.seckill.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales != undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售{{ item.seckill.sales }} {{ item.seckill.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales == undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售{{ item.ficti }} {{ item.seckill.unit_name }}
                </div>
                <div class="maidian" @click="showMai(item.selling_point)">
                  卖点
                  <img src="@assets/images/backIcon.png" alt="" />
                </div>
              </div>

              <div
                v-show="titleType == '0'"
                class="vip acea-row row-between-wrapper"
              >
                <div
                  class="vip-money font-color-red"
                  v-show="item.is_free == '0' && item.is_seckill == '0'"
                >
                  ￥<span style="font-size:0.3rem;">{{
                    item.price.split(".")[0]
                  }}</span
                  >.{{ item.price.split(".")[1] }}
                </div>
                <div
                  class="vip-money font-color-red"
                  v-if="item.is_seckill == '1'"
                >
                  ￥<span style="font-size:0.3rem;">{{
                    item.seckill.price.split(".")[0]
                  }}</span
                  >.{{ item.seckill.price.split(".")[1] }}
                </div>

                <div
                  class="vip-money font-color-red"
                  v-show="item.is_free == '1' && item.is_seckill == '0'"
                >
                  ￥<span style="font-size:0.3rem;">0</span>.00
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales == undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售0 {{ item.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales != undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售{{ item.sales + item.ficti }} {{ item.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales != undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售{{ item.sales }} {{ item.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales == undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '0'
                  "
                >
                  已售{{ item.ficti }} {{ item.unit_name }}
                </div>

                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales == undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售0 {{ item.seckill.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales != undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售{{ item.seckill.sales + item.ficti
                  }}{{ item.seckill.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.seckill.sales != undefined &&
                      item.ficti == undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售{{ item.seckill.sales }} {{ item.seckill.unit_name }}
                </div>
                <div
                  class="allbuy"
                  v-if="
                    item.sales == undefined &&
                      item.ficti != undefined &&
                      item.is_seckill == '1'
                  "
                >
                  已售{{ item.ficti }} {{ item.seckill.unit_name }}
                </div>
              </div>
              <div class="allMai" v-show="titleType == '0'">
                <div class="maidian" @click="showMai(item.selling_point)">
                  卖点
                  <img src="@assets/images/backIcon.png" alt="" />
                </div>
                <div
                  class="cangetMoney"
                  v-if="item.is_free == '0'"
                  @click="addMyList(item.id, 1, 1)"
                >
                  + 赚￥{{ item.brokerage }}
                </div>
                <div
                  class="cangetMoney"
                  v-if="item.is_free == '1'"
                  @click="addMyList(item.id, 1, 1)"
                >
                  + 赚￥0.00
                </div>
              </div>
            </div>
          </div>
        </div>
      </scroller>
    </div>

    <div
      class="scrollDiv"
      style="position:relative;"
      :style="{ height: scrollDivHeight1 }"
      v-if="titleType == '3'"
    >
      <scroller :on-infinite="infinite" :on-refresh="refresh" ref="my_scroller">
        <div class="list" style="padding:0;">
          <div
            class="item item1"
            style="width:100%;"
            v-for="order in orderList"
            :key="order.id"
          >
            <div class="title acea-row row-between-wrapper">
              <div
                class="acea-row row-middle"
                style="padding:0.24rem 0 0 0.3rem;"
              >
                订单号：{{ order.order_id }}
              </div>
              <div class="font-color-red" style="padding:0.24rem 0.3rem 0 0;">
                {{ getStatus(order) }}
              </div>
            </div>
            <div class="goodWrapper" style="padding:0.32rem 0 0.24rem 0;">
              <div
                class="item acea-row row-between-wrapper"
                v-for="cart in order.cartInfo"
                :key="cart.id"
                style="padding-top: 0px; padding-bottom: 0px; width: 100%;justify-content:flex-start;"
              >
                <div class="pictrue">
                  <img
                    class="image"
                    :src="cart.productInfo.image"
                    v-if="
                      cart.combination_id === 0 &&
                        cart.bargain_id === 0 &&
                        cart.seckill_id === 0
                    "
                  />
                  <img
                    class="image"
                    :src="cart.productInfo.image"
                    v-else-if="cart.combination_id > 0"
                  />
                  <img
                    class="image"
                    :src="cart.productInfo.image"
                    v-else-if="cart.bargain_id > 0"
                  />
                  <img
                    class="image"
                    :src="cart.productInfo.image"
                    v-else-if="cart.seckill_id > 0"
                  />
                </div>
                <div class="text" style="padding:0;">
                  <div class="acea-row row-between-wrapper">
                    <div class="name line1">
                      {{ cart.productInfo.store_name }}
                    </div>
                    <!-- <div class="num">x {{ cart.cart_num }}</div> -->
                  </div>
                  <div class="attr line1" v-if="cart.productInfo.attrInfo">
                    {{ cart.productInfo.attrInfo.suk }}
                  </div>
                  <div class="money font-color-red">
                    <span
                      v-show="cart.productInfo.is_seven_returned == 1"
                      class="cantui"
                      >7天无理由退换货</span
                    >
                    <span
                      v-show="cart.productInfo.is_seven_returned == 0"
                      class="cantui"
                      >不支持7天无理由退货</span
                    >
                  </div>
                  <div class="evaluate" v-if="evaluate === 3">
                    评价
                  </div>
                </div>
              </div>
            </div>
            <div class="totalPrice">
              <span class="all">共{{ order.orderNum }}件商品</span>
              <span class="money">￥{{ order.pay_price }}</span>
              <span class="heji">合计</span>
            </div>
            <div
              class="bottom acea-row row-right row-middle"
              style="justify-content: space-between;padding:0 0.3rem;height:0.95rem;"
            >
              <div class="leftFen">本订单分成</div>
              <div class="rightMoney" v-if="order.refund_status == '2'">
                - ￥{{ order.channel_profit_price }}
              </div>
              <div class="rightMoney" v-else>
                + ￥{{ order.channel_profit_price }}
              </div>
            </div>
          </div>
        </div>
      </scroller>
      <div
        class="noCart"
        v-if="orderList.length === 0 && page >= 1 && canSCroll == true"
      >
        <div class="pictrue"><img src="@assets/images/noOrder.png" /></div>
        <p class="txt">暂无订单信息</p>
      </div>
    </div>
    <div class="bottomDiv" v-show="titleType == '1' && managetype">
      <div class="leftDiv" @click="deleteGoods()">
        <img src="@assets/images/deleteGood.png" alt="" />
        <span>删除商品</span>
      </div>
      <div class="rightDiv" @click="toTop()">
        <img src="@assets/images/toTop.png" alt="" />
        <span>置顶推荐</span>
      </div>
    </div>
    <div class="bottomDiv" v-show="titleType == '0' && managetype">
      <div
        class="leftDiv"
        style="width:100%;text-align:center;font-size:0.28rem;color:rgba(0, 0, 0, 0.8);font-weight:500;"
        @click="addGoods()"
      >
        添加到橱窗
      </div>
    </div>
    <div
      class="madianDiv"
      v-show="(titleType == 1 && showMaiDiv) || (titleType == 0 && showMaiDiv)"
    >
      <div>
        <p class="content">{{ maidianContent }}</p>
        <p class="sure" @click="hiddenMai">我知道了</p>
      </div>
    </div>

    <div class="toastDownload" v-show="isShowAlert && titleType == 3">
      <div class="modela">
        <h1>账期为30天，到期后自动转入钱袋-电商收入中</h1>
        <div @click="hideAlert">
          确定
        </div>
      </div>
    </div>
    <!-- 二次确认弹窗 -->
    <div class="confirmBox" v-show="isConfirm">
      <div class="ceng">
        <p class="confirmTltle">{{ toastMsg }}</p>
        <div>
          <span class="NoConfirm" @click="NoConfirm()">取消</span>
          <span class="confirm" @click="confirm()">确定</span>
        </div>
      </div>
    </div>
    <!-- 回到顶部 -->
    <div
      class="toTop"
      @click="returnTop"
      v-show="(titleType == '1' || titleType == '0') && showToTop == '1'"
    >
      <img src="@assets/images/toTop1.png" alt="" srcset="" />
    </div>
  </div>
</template>

<script>
import { getProducts } from "@api/store";
import { enter_product_show } from "@api/store";
import { productLists, first_list } from "@api/store";
import { getMyOrderList } from "@api/order";
import { enter_product_top } from "@api/store";
import cookie from "@utils/store/cookie";
import { isWeixin } from "@utils/index";
import debounce from "lodash.debounce";
import Loading from "@components/Loading";
import newGoodsList from "@components/newGoodsList";
import { goShopDetail } from "@libs/order";
import { clearAuthStatus } from "@libs/wechat";
import { connect } from "tls";
import dayjs from "dayjs";
import { swiper, swiperSlide } from "vue-awesome-swiper";
import shareMsg from "../../assets/js/common/shareConfig.js";
import share from "../../assets/js/common/share.js";
import "@assets/css/swiper.min.css";
import { constants } from "fs";
import { setTimeout } from "timers";
export default {
  name: "goodsManage",
  components: {
    Loading,
    newGoodsList,
    swiper,
    swiperSlide
  },
  props: {},
  data: function() {
    const { s = "", id = 0, title = "" } = this.$route.query;
    let that = this;
    return {
      toastMsg: "",
      isallChecked: false,
      isConfirm: false,
      sureType: "",
      showNewGoods: false,
      scroll: 0,
      //?展示
      isShowAlert: false,
      allGoodsNum: "0",
      realBeansum: "0.00",
      maidianContent: "",
      showMaiDiv: false,
      managetype: false,
      scrollDivHeight: "0px",
      scrollDivHeight1: "0px",
      titleType: "1",
      hostProduct: [],
      productList: [],
      Switch: true,
      where: {
        page: 1,
        limit: 20,
        is_show: "1",
        number: "",
        cate_id: "",
        type: "",
        upOrDown: ""
      },
      title: title && id ? title : "",
      loadTitle: "",
      loading: false,
      loadend: false,
      loading1: false,
      loadend1: false,
      noDate1: false, //重置数据判断
      canSCroll1: false,
      price: 0,
      stock: 0,
      nows: false,
      bannerType: "1",
      broadcasts: "1",
      height: "",
      ProductConSwiper: {
        slidesPerView: "auto",
        // centeredSlides : true,
        // centeredSlidesBounds: true,
        autoplayDisableOnInteraction: false // 这样，即使我们滑动之后， 定时器也不会被清除
      },
      from1: "",
      pageTitle: "商品橱窗",
      setTitles: true,
      cantClick: false,
      deleteIdArr: [],
      orderList: [],
      page: 1,
      limit: 20,
      type: "",
      noDate: false, //重置数据判断
      canSCroll: false,
      countTimetimer: "",
      listLength: 0,
      tabList: [],
      showToTop: "0",
      timerToTop: "",
      bottomShow: false,
      cate_id: "",
      //佣金，价格排序
      priceTypeGet: "1",
      priceType: "1"
    };
  },
  activated() {
    this.$refs.pullRefresh.scrollTop = this.scroll;
  },
  watch: {
    $route(to) {
      if (to.name !== "GoodsList") return;
      const { s = "", id = 0, title = "" } = to.query;
    }
  },
  created() {
    // this.height = document.body.clientHeight + "px";
  },
  mounted: function() {
    var that = this;
    let isFromApp = this.$route.query.from1;
    if (isFromApp == undefined) {
      isFromApp = "h5";
    }
    cookie.set("from1", isFromApp);
    this.from1 = cookie.get("from1");
    if (this.from1 == "app") {
      // that.isNo();
      this.getParameter();
      window["onWebResponse"] = str => {
        that.onWebResponse(str);
      };
    } else if (this.from1 == "wxapp") {
      this.get_first_list();
    } else {
      this.get_first_list();
    }
    if (isWeixin()) {
    } else {
      if (cookie.get("from1") != "app") {
        // window.location.href = 'http://share.cbct.cn/downloadPage';
      }
    }
    this.scrollDivHeight =
      window.innerHeight - this.$refs.titleBarHeight.clientHeight + "px";
  },
  methods: {
    changePriceTypeGet: function() {
      this.priceType = "1";
      this.where.type = "0";
      if (this.priceTypeGet == "1") {
        this.priceTypeGet = "2";
        this.where.upOrDown = "0";
      } else if (this.priceTypeGet == "2") {
        this.priceTypeGet = "3";
        this.where.upOrDown = "1";
      } else if (this.priceTypeGet == "3") {
        this.priceTypeGet = "2";
        this.where.upOrDown = "0";
      }
      this.where.page = 1;
      this.get_product_list();
    },
    changePriceType: function() {
      this.priceTypeGet = "1";
      this.where.type = "1";
      if (this.priceType == "1") {
        this.priceType = "2";
        this.where.upOrDown = "0";
      } else if (this.priceType == "2") {
        this.priceType = "3";
        this.where.upOrDown = "1";
      } else if (this.priceType == "3") {
        this.priceType = "2";
        this.where.upOrDown = "0";
      }
      this.where.page = 1;
      this.get_product_list();
    },
    makeAinterval: function() {
      this.timerToTop = setInterval(() => {
        console.log(this.$refs.my_scroller.getPosition().top);
        if (this.$refs.my_scroller.getPosition().top > 1500) {
          this.showToTop = "1";
        } else {
          this.showToTop = "0";
        }
      }, 100);
    },
    //回到顶部
    returnTop: function() {
      if (this.titleType == "1" || this.titleType == "0") {
        this.$refs.pullRefresh.scrollTo(0, 0);
        this.showToTop = "0";
      } else if (this.titleType == "3") {
        this.$refs.my_scroller.scrollTo(0, 0);
      }
    },
    changetabType: function(id) {
      var that = this;
      that.tabList.forEach((value, index) => {
        if (value.cate_id == id) {
          that.$set(value, "ischecked", true);
          that.where.cate_id = value.cate_id;
        } else {
          that.isallChecked = false;
          that.managetype = false;
          that.$set(value, "ischecked", false);
        }
      });
      that.productList = [];
      this.where.page = 1;
      that.get_product_list();
    },
    hosterMsg: function() {
      var swiper = new Swiper("#tabSwiper", {
        slidesPerView: "auto",
        spaceBetween: 20,
        observer: true,
        observeParents: true
        // watchSlidesProgress : true,
        // watchSlidesVisibility : true,
        // on:{
        //     tap: function(){
        //         myPage.slideTo( swiper.clickedIndex)
        //     }
        // }
      });
    },
    // scrollHeight:function(){
    //   let pullRefreshScrollTop = this.$refs.pullRefresh.scrollTop;
    //   console.log(pullRefreshScrollTop);
    //   if(pullRefreshScrollTop > 500){
    //     this.showToTop = '1';
    //   }else{
    //     this.showToTop = '0';
    //   }
    // },
    clickItem(item) {
      let wrapperScrollTop = this.$refs.container.scrollTop;
      let pullRefreshScrollTop = this.$refs.pullRefresh.scrollTop;
      let listScrollTop = this.$refs.list.scrollTop;
      let itemScrollTop = this.$refs.item.scrollTop;
      this.scroll = wrapperScrollTop;
      // this.$router.push({name: "detail", params: {data: item}})
    },
    showAlert: function() {
      this.isShowAlert = true;
    },
    hideAlert: function() {
      this.isShowAlert = false;
    },
    getStatus(order) {
      // return STATUS[order._status._type];
      if (order.paid == "0") {
        this.$set(order, "listStatus", "0");
        return "等待付款";
      } else if (
        order.paid == "1" &&
        order.status == "0" &&
        order.refund_status == "0"
      ) {
        this.$set(order, "listStatus", "1");
        return "等待商家发货";
      } else if (
        order.paid == "1" &&
        order.status == "1" &&
        order.refund_status == "0"
      ) {
        this.$set(order, "listStatus", "2");
        return "等待收货";
      } else if (
        order.refund_status == "0" &&
        order.status == "3" &&
        order.is_system_del == "0"
      ) {
        this.$set(order, "listStatus", "3");
        return "交易完成";
      } else if (
        order.refund_status == "0" &&
        order.status == "2" &&
        order.is_system_del == "0"
      ) {
        this.$set(order, "listStatus", "4");
        return "交易完成";
      } else if (order.paid == "1" && order.refund_status == "1") {
        this.$set(order, "listStatus", "4");
        return "退款中";
      } else if (order.paid == "1" && order.refund_status == "2") {
        this.$set(order, "listStatus", "4");
        return "交易完成,退款成功";
      } else if (order.is_system_del == "1") {
        this.$set(order, "listStatus", "4");
        return "交易完成,订单关闭";
      }
    },
    showMai: function(content) {
      this.maidianContent = content;
      this.showMaiDiv = true;
    },
    hiddenMai: function() {
      this.maidianContent = "";
      this.showMaiDiv = false;
    },
    infinite(done) {
      var self = this;
      if (self.titleType == "1" || self.titleType == "0") {
        setTimeout(function() {
          var timer4 = setInterval(function() {
            if (!self.canSCroll1) {
              return;
            } else {
              if (self.noDate1) {
                self.$refs.my_scroller1.finishInfinite(true); //这个方法是不让它加载了，显示“没有更多数据”，要不然会一直转圈圈
              } else {
                setTimeout(() => {
                  self.where.page++; //下拉一次页数+1
                  self.get_product_list();
                  done(); //进行下一次加载操作
                }, 500);
              }
              clearInterval(timer4);
            }
          }, 100);
        }, 200);
      } else {
        setTimeout(function() {
          var timer1 = setInterval(function() {
            if (!self.canSCroll) {
              return;
            } else {
              if (self.noDate) {
                self.$refs.my_scroller.finishInfinite(true); //这个方法是不让它加载了，显示“没有更多数据”，要不然会一直转圈圈
              } else {
                setTimeout(() => {
                  self.page++; //下拉一次页数+1
                  self.getOrderList();
                  done(); //进行下一次加载操作
                }, 500);
              }
              clearInterval(timer1);
            }
          }, 100);
        }, 200);
      }
    },
    refresh() {
      var self = this;
      if (self.titleType == "3") {
        var timer2 = setInterval(function() {
          if (!self.canSCroll) {
            self.$refs.my_scroller.finishPullToRefresh();
          } else {
            self.page = 1; //重置页数刷新每次页数都是第一页
            self.noDate = false; //重置数据判断
            setTimeout(
              function() {
                self.orderList = [];
                self.getOrderList();
                self.$refs.my_scroller.finishPullToRefresh(); //刷新完毕关闭刷新的转圈圈
              }.bind(this),
              700
            );
            clearInterval(timer2);
          }
        }, 100);
      } else {
        var timer3 = setInterval(function() {
          if (!self.canSCroll1) {
            self.$refs.my_scroller1.finishPullToRefresh();
          } else {
            self.where.page = 1; //重置页数刷新每次页数都是第一页
            self.noDate1 = false; //重置数据判断
            setTimeout(
              function() {
                self.orderList = [];
                self.get_product_list();
                self.$refs.my_scroller1.finishPullToRefresh(); //刷新完毕关闭刷新的转圈圈
              }.bind(this),
              700
            );
            clearInterval(timer3);
          }
        }, 100);
      }
    },
    getOrderList() {
      var that = this;
      // if (this.loading || this.loaded) return;
      // this.loading = true;
      const { page, limit } = this;
      getMyOrderList({
        page,
        limit,
        mer_id: this.$route.params.id
      }).then(res => {
        that.$refs.my_scroller.finishPullToRefresh();
        let d = res.data.list;
        var length = 0;
        if (d.length == length) {
          that.noDate = true;
          if (that.page == 1) {
            this.realBeansum = res.data.sum;
            this.orderList = res.data.list;
            that.canSCroll = true;
            document.querySelector(".loading-layer").style.display = "none";
            // that.$refs.my_scroller.finishPullToRefresh();//刷新完毕关闭刷新的转圈圈
          }
        } else if (that.page == 1) {
          this.canSCroll = true;
          this.realBeansum = res.data.sum;
          this.orderList = res.data.list;
        } else {
          that.orderList = that.orderList.concat(res.data.list);
        }
        for (var i = 0; i < that.orderList.length; i++) {
          var orderNum = 0;
          for (var j = 0; j < that.orderList[i].cartInfo.length; j++) {
            orderNum += that.orderList[i].cartInfo[j].cart_num;
          }
          that.$set(that.orderList[i], "orderNum", orderNum);
        }
      });
    },
    //置顶
    toTop: function() {
      if (this.deleteIdArr.length > 1) {
        return this.$dialog.toast({ mes: "同时只能置顶一个商品哦~" });
      }
      if (this.deleteIdArr.length == 0) {
        return this.$dialog.toast({ mes: "请选择商品~" });
      }
      var q = {
        product_id: this.deleteIdArr[0],
        mer_id: this.$route.params.id
      };
      enter_product_top(q).then(res => {
        this.managetype = false;
        this.productList.forEach((value, index) => {
          value.ischecked = false;
        });
        this.$dialog.toast({ mes: "置顶成功" });
        this.where.page = 1;
        this.get_product_list();
      });
    },
    //添加新作品
    addNewGoods: function() {
      var q = {
        p_ids: [],
        is_show: 2,
        mer_id: this.$route.params.id
      };
      enter_product_show(q).then(res => {
        this.$dialog.toast({ mes: "添加成功" });
        this.managetype = false;
        this.productList = [];
        this.where.page = 1;
        this.get_product_list();
        this.showNewGoods = false;
        setTimeout(() => {
          window.location.href = "";
        });
      });
    },
    //添加到我的商品
    addMyList: function(id, type) {
      this.isConfirm = true;
      this.toastMsg = "确认将商品添加到商品橱窗吗？";
      this.sureType = "1";
      this.deleteIdArr = [];
      this.deleteIdArr.push(id);
    },
    NoConfirm: function() {
      this.isConfirm = false;
      this.toastMsg = "";
      this.sureType = "";
      // this.deleteIdArr = [];
    },
    confirm: function() {
      // if(this.sureType == '1'){
      var q = {
        p_ids: this.deleteIdArr,
        is_show: this.sureType,
        mer_id: this.$route.params.id
      };
      enter_product_show(q).then(res => {
        if (this.sureType == "1") {
          this.$dialog.toast({ mes: "添加成功" });
        } else {
          this.$dialog.toast({ mes: "删除成功" });
        }
        this.isallChecked = false;
        this.isConfirm = false;
        this.toastMsg = "";
        this.sureType = "";
        this.deleteIdArr = [];
        this.productList = [];
        this.managetype = false;
        this.where.page = 1;
        this.get_product_list();
      });
      // }
    },
    //删除我的商品
    deleteGoods: function() {
      if (this.deleteIdArr.length == 0) {
        return this.$dialog.toast({ mes: "请选择商品~" });
      }
      this.isConfirm = true;
      this.toastMsg = "确认删除商品吗？";
      this.sureType = "0";
    },
    //添加我的商品
    addGoods: function() {
      if (this.deleteIdArr.length == 0) {
        return this.$dialog.toast({ mes: "请选择商品~" });
      }
      this.isConfirm = true;
      this.toastMsg = "确认将商品添加到商品橱窗吗？";
      this.sureType = "1";
    },
    //切换顶部title
    changeTitleType: function(type) {
      this.titleType = type;
      this.showToTop = "0";
      this.where.upOrDown = "";
      this.where.type = "";
      this.priceTypeGet = "1";
      this.priceType = "1";
      if (type == "1" || type == "0") {
        this.productList = [];
        this.orderList = [];
        if (type == "0") {
          setTimeout(() => {
            this.scrollDivHeight =
              window.innerHeight -
              this.$refs.titleBarHeight.clientHeight +
              "px";
          }, 10);
        } else {
          setTimeout(() => {
            this.scrollDivHeight =
              window.innerHeight -
              this.$refs.titleBarHeight.clientHeight +
              "px";
          }, 10);
        }
        this.managetype = false;
        this.deleteIdArr = [];
        this.isallChecked = false;
        this.where.is_show = type;
        this.get_first_list();
      } else {
        if (this.timerToTop != "") {
          clearInterval(this.timerToTop);
        }
        this.makeAinterval();
        this.productList = [];
        this.orderList = [];
        this.getOrderList();
        setTimeout(() => {
          this.scrollDivHeight1 =
            window.innerHeight - this.$refs.titleBarHeight.clientHeight + "px";
        }, 10);
      }
    },
    //修改选中类型
    changeCheckedType: function(item) {
      if (item.ischecked == true) {
        item.ischecked = false;
        this.isallChecked = false;
      } else {
        item.ischecked = true;
        var noChoice = [];
        this.productList.forEach((value, index) => {
          if (value.ischecked == false) {
            noChoice.push(value.id);
          }
        });
        if (noChoice.length == 0) {
          this.isallChecked = true;
        } else {
          this.isallChecked = false;
        }
      }
      this.deleteIdArr = [];
      this.productList.forEach((value, index) => {
        if (value.ischecked) {
          this.deleteIdArr.push(value.id);
        }
      });
    },
    //全选
    allChecked: function() {
      this.deleteIdArr = [];
      if (this.isallChecked == true) {
        this.isallChecked = false;
        this.productList.forEach((value, index) => {
          value.ischecked = false;
        });
      } else {
        this.isallChecked = true;
        this.productList.forEach((value, index) => {
          value.ischecked = true;
          this.deleteIdArr.push(value.id);
        });
      }
    },
    //管理
    changeManageType: function() {
      if (this.managetype) {
        this.managetype = false;
        this.isallChecked = false;
        this.productList.forEach((value, index) => {
          value.ischecked = false;
        });
      } else {
        this.managetype = true;
      }
    },
    clearOneCookie: function(cookieName) {
      var cookies = document.cookie.split(";"); //将所有cookie键值对通过分号分割为数组
      //循环遍历所有cookie键值对
      for (var i = 0; i < cookies.length; i++) {
        //有些cookie键值对前面会莫名其妙产生一个空格，将空格去掉
        if (cookies[i].indexOf(" ") == 0) {
          cookies[i] = cookies[i].substring(1);
        }
        //比较每个cookie的名称，找到要删除的那个cookie键值对
        if (cookies[i].indexOf(cookieName) == 0) {
          var exp = new Date(); //获取客户端本地当前系统时间
          exp.setTime(exp.getTime() - 60 * 1000); //将exp设置为客户端本地时间1分钟以前，将exp赋值给cookie作为过期时间后，就表示该cookie已经过期了, 那么浏览器就会将其立刻删除掉
          document.cookie = cookies[i] + ";expires=" + exp.toUTCString(); //设置要删除的cookie的过期时间，即在该cookie的键值对后面再添加一个expires键值对，并将上面的exp赋给expires作为值(注意expires的值必须为UTC或者GMT时间，不能用本地时间），那么浏览器就会将该cookie立刻删除掉
          //注意document.cookie的用法很巧妙，在对其进行赋值的时候是设置单个cookie的信息，但是获取document.cookie的值的时候是返回所有cookie的信息
          break; //要删除的cookie已经在客户端被删除掉，跳出循环
        }
      }
    },
    //声音禁掉
    isNo: function() {
      var u = navigator.userAgent,
        app = navigator.appVersion;
      var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1; //g
      var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
      const win = window;
      var obj = {
        action: "onClickPlay",
        content: {}
      };
      if (isAndroid) {
        App.onAppResponse(JSON.stringify(obj));
      }
      if (isIOS) {
        win.webkit.messageHandlers.onAppResponse.postMessage(
          JSON.stringify(obj)
        );
      }
    },
    hrefs(url) {
      var a = url.indexOf("ds.");
      if (a == -1) {
        window.location.href = url;
      } else {
        this.$router.push({ path: url.split("cbct.cn")[1] });
      }
    },
    broadcast: function() {
      if (this.bannerType == "2") {
        this.broadcasts = "0";
        this.stops = "0";
        var video = document.querySelector("video");
        video.play();
      }
      if (this.bannerType == "3") {
        if (this.from1 == "app") {
          var u = navigator.userAgent,
            app = navigator.appVersion;
          var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1; //g
          var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
          const win = window;
          var obj = {
            action: "toliveRoom",
            content: {
              number: this.live_id,
              isLive: "1"
            }
          };
          if (isAndroid) {
            App.onAppResponse(JSON.stringify(obj));
          }
          if (isIOS) {
            win.webkit.messageHandlers.onAppResponse.postMessage(
              JSON.stringify(obj)
            );
          }
        } else {
          var src = this.cbct
            .https()
            .split("channels.")[1]
            .split(".")[0];
          if (src != "" && src != undefined) {
            if (src != "dev" && src != "test") {
              src = "";
            } else {
              src = src + ".";
            }
          }
          window.location.href =
            "http://share." +
            src +
            "cbct.cn/programRecorded?type=1&isLive=1&live_id=" +
            this.live_id;
          //
        }
      }
    },
    // 嵌入app获取支付状态
    onWebResponse: function(str) {
      var obj = JSON.parse(str);
      var action = obj.action;
      var self = this;
      var content = obj.content;
      if (action == "setUserInfo") {
        let did = content.did;
        let isToken = content.ds_token;
        let expires_time = content.ds_expires_time;
        let isSalt = content.salt;
        if (isToken == "") {
          this.$store.commit(
            "LOGIN",
            isToken
            // dayjs(expires_time) - newTime
          );
        } else {
          // alert(isToken);
          let newTime = Math.round(new Date() / 1000);
          this.$store.commit(
            "LOGIN",
            isToken
            // dayjs(expires_time) - newTime
          );

          this.get_first_list();
        }
      }
    },
    // 商品详情跳转
    goDetail(item) {
      // let wrapperScrollTop = this.$refs.container.scrollTop;
      let pullRefreshScrollTop = this.$refs.pullRefresh.scrollTop;
      // let listScrollTop = this.$refs.list.scrollTop;
      // let itemScrollTop = this.$refs.item.scrollTop;
      this.scroll = pullRefreshScrollTop;
      goShopDetail(item).then(() => {
        this.$router.push({
          path: "/detail/" + item.id + "?mer_id=" + this.$route.params.id
        });
      });
    },
    getParameter: function() {
      var self = this;
      var u = navigator.userAgent,
        app = navigator.appVersion;
      var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1; //g
      var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
      const win = window;
      var obj = {
        action: "getParameter",
        content: {
          method: "setUserInfo",
          Parameter: {}
        }
      };
      if (isAndroid) {
        App.onAppResponse(JSON.stringify(obj));
      }
      if (isIOS) {
        win.webkit.messageHandlers.onAppResponse.postMessage(
          JSON.stringify(obj)
        );
      }
    },
    getTitle: function() {
      var self = this;
      if (self.pageTitle == undefined) {
        self.pageTitle = "商品橱窗";
      }
      var u = navigator.userAgent,
        app = navigator.appVersion;
      var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1; //g
      var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
      var obj = {
        action: "setTitle",
        content: {
          title: self.pageTitle
        }
      };
      if (isAndroid) {
        App.onAppResponse(JSON.stringify(obj));
      }
    },
    get_first_list: function() {
      var that = this;
      let qs = {
        mer_id: this.$route.params.id,
        type: this.titleType == "0" ? "1" : "0"
      };
      first_list(qs).then(res => {
        res.data.forEach((value, index) => {
          if (index == 0) {
            that.cate_id = value.cate_id;
            that.$set(value, "ischecked", true);
            that.where.cate_id = value.cate_id;
          } else {
            that.$set(value, "ischecked", false);
          }
        });
        that.tabList = res.data;
        that.$nextTick(function() {
          // that.hosterMsg();
          this.where.page = 1;
          that.get_product_list();
        });
        console.log(res);
      });
    },
    get_product_list: function() {
      var that = this;
      that.showNewGoods = false;
      that.where.number = that.$route.params.id;
      let q = that.where;
      // let id = that.$route.params.id;
      productLists(q).then(res => {
        console.log(that.where.page);
        this.cantClick = false;

        that.$refs.my_scroller1.finishPullToRefresh();
        let d = res.data.list;
        var length = 0;
        if (d.length == length) {
          that.noDate1 = true;
          if (this.cate_id == this.where.cate_id) {
            this.bottomShow = true;
          }

          if (that.where.page == 1) {
            if (this.titleType == 1) {
              this.allGoodsNum = res.data.num;
            }
            this.showNewGoods = true;
            that.canSCroll1 = true;
            document.querySelector(".loading-layer").style.display = "none";
          }
        } else if (that.where.page == 1) {
          if (this.titleType == 1) {
            this.allGoodsNum = res.data.num;
          }
          this.canSCroll1 = true;
          this.productList = res.data.list;
        } else {
          that.productList = that.productList.concat(res.data.list);
        }
        this.productList.forEach((value, index) => {
          this.$set(value, "ischecked", false);
        });
        console.log(this.productList.length);
        this.countTimeFunction();
      });
    },
    countTimeFunction() {
      var self = this;
      if (self.countTimetimer != "") {
        clearInterval(self.countTimetimer);
      }
      self.countTimetimer = setInterval(function() {
        self.listLength = 0;
        self.productList.forEach((value, index) => {
          if (value.is_seckill == "1") {
            var timeDom = "";
            var date = new Date();
            var now = parseInt(date.getTime() / 1000);
            var differTime = value.seckill.stop_time - now;
            var h, m, s;
            if (differTime >= 0) {
              h = Math.floor(differTime / 60 / 60);
              m = Math.floor((differTime / 60) % 60);
              s = Math.floor(differTime % 60);
              h = h < 10 ? "0" + h : h;
              m = m < 10 ? "0" + m : m;
              s = s < 10 ? "0" + s : s;
              timeDom = h + ":" + m + ":" + s;
            } else {
              value.is_seckill = "0";
              timeDom = "";
            }
            self.$set(value.seckill, "countTime", timeDom);
          } else {
            self.listLength++;
          }
        });
        if (self.listLength == self.productList.length) {
          clearInterval(self.countTimetimer);
        }
      }, 1000);
    },
    switchTap: function() {
      let that = this;
      that.Switch = !that.Switch;
    }
  },
  updated() {
    document.scrollingElement.scrollTop = 0;
  },
  destroyed: function() {
    clearInterval(this.timerToTop);
  }
};
</script>
<style scoped lang="scss">
.confirmBox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 778;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  .ceng {
    display: block;
    width: 6rem;
    height: 2.9rem;
    background: rgba(255, 255, 255, 1);
    border-radius: 0.16rem;
    justify-content: center;
    margin: 50% auto 0;
    justify-items: center;
    .confirmTltle {
      width: 100%;
      height: 1.84rem;
      line-height: 1.84rem;
      text-align: center;
      font-size: 0.34rem;
      color: #333;
      border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    }
    .NoConfirm {
      display: inline-block;
      width: 50%;
      height: 1.04rem;
      line-height: 1.04rem;
      text-align: center;
      font-size: 0.32rem;
      color: rgba(0, 0, 0, 0.5);
      border-right: 1px solid rgba(0, 0, 0, 0.2);
    }
    .confirm {
      display: inline-block;
      width: 50%;
      height: 1.04rem;
      line-height: 1.04rem;
      text-align: center;
      font-size: 0.32rem;
      color: rgba(68, 115, 225, 1);
    }
  }
}
.erjiTab {
  width: 100%;
  height: 1rem;
  background: #f9f9f9;
  .swiper-slide {
    width: auto;
  }
  .oneTabs {
    overflow: hidden;
    font-size: 0.28rem;
    height: 1rem;
    padding: 0 0.06rem;
    p {
      height: 0.28rem;
      line-height: 0;
      color: rgba(0, 0, 0, 0.4);
      padding: 0.5rem 0.24rem 0.2rem 0.24rem;
    }
    .active {
      color: rgba(0, 0, 0, 0.8);
      font-weight: 500;
    }
    span {
      display: block;
      margin: 0 auto;
      width: 0.32rem;
      height: 0.04rem;
      background: rgba(255, 35, 35, 1);
      border-radius: 0.04rem;
    }
  }
}
.toTop {
  position: absolute;
  bottom: 0.1rem;
  right: 0.3rem;
  width: 1.08rem;
  height: 1.08rem;
  z-index: 100;
  img {
    width: 100%;
  }
}
.sort_div {
  float: left;
  width: auto;
  height: 100%;
  .one_sort {
    line-height: 1;
    width: auto;
    float: left;
    margin-left: 0.3rem;
    height: 0.4rem;
    margin-top: 0.32rem;
    margin-bottom: 0.26rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    p {
      font-size: 0.28rem;
      color: rgba(0, 0, 0, 0.5);
    }
    img {
      width: 0.24rem;
      height: 0.24rem;
      margin-left: 0.04rem;
    }
  }
}
</style>

<style scoped>
.item1 {
  width: 100%;
  height: 4.8rem;
}
.madianDiv {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}
.madianDiv div {
  position: absolute;
  /* top:4.24rem; */
  width: 6.2rem;
  /* left: 0.66rem; */
  height: auto;
  background: rgba(255, 255, 255, 1);
  border-radius: 0.16rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.madianDiv div .content {
  width: 5.28rem;
  margin: 0.54rem 0.46rem 0 0.46rem;
  padding-bottom: 0.5rem;
  font-size: 0.36rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
  line-height: 0.6rem;
  border-bottom: 0.02rem solid rgba(0, 0, 0, 0.1);
  text-align: center;
}
.madianDiv div .sure {
  text-align: center;
  color: rgba(68, 115, 225, 1);
  font-size: 0.32rem;
  width: 100%;
  padding: 0.32rem 0.46rem 0.4rem 0.46rem;
  font-weight: 500;
  color: rgba(68, 115, 225, 1);
  line-height: 0.44rem;
}
.product-bg {
  height: 4.22rem;
  overflow: hidden;
}
.videoBox {
  position: fixed;
  z-index: 999;
  top: 0;
  width: 100%;
  height: 100%;
}

.videoBox video {
  width: 100%;
  height: 100%;
}
.video-source {
  width: 100%;
  height: 100%;
}
.video_play {
  position: absolute;
  width: 1rem;
  height: 1rem;
  left: 45%;
  top: 45%;
  z-index: 11;
}
.productList2 {
  top: 0;
  bottom: 0;
}
.productList2 .allTitleDiv {
  width: 100%;
  height: auto;
  overflow: hidden;
}
.productList2 .titleBar {
  width: 100%;
  height: 0.96rem;
  background: #f9f9f9;
  font-size: 0.28rem;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 500;
}
.productList2 .titleBar p {
  height: auto;
  float: left;
  width: 33.3333%;
  line-height: 1;
  padding: 0.34rem 0;
  text-align: center;
}
.productList2 .titleBar .active {
  color: rgba(255, 89, 89, 1);
}
.productList2 .goodsNumDiv {
  width: 100%;
  height: 0.98rem;
  overflow: hidden;
  background: #f9f9f9;
}
.productList2 .goodsNumDiv .leftshouNum {
  float: left;
  font-size: 0.28rem;
  line-height: 1;
  padding: 0.35rem 0 0.35rem 0.3rem;
  color: rgba(0, 0, 0, 0.5);
}
.productList2 .goodsNumDiv .leftshouNum span {
  color: rgba(255, 89, 89, 1);
}
.productList2 .goodsNumDiv .manage {
  float: right;
  line-height: 1;
  padding: 0.33rem 0.3rem 0.32rem 0;
  font-size: 0.28rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
}
.noCommodity {
  border-top: 3px solid #f5f5f5;
  padding-bottom: 1px;
}
.all {
  position: relative;
  top: 0rem;
  width: 7.5rem;
  overflow: hidden;
}
.all .programList,
.mine {
  width: 100%;
  flex: 1;
  overflow: hidden;
}
div::-webkit-scrollbar {
  display: none;
}
.video {
  box-sizing: border-box;
  width: 7.5rem;
  height: 4rem;
  overflow: hidden;
  margin: auto;
  position: relative;
}
.video .swiper-wrapper {
  border-radius: 0.12rem;
}
.cengs {
  width: 100%;
  height: 4rem;
  background-size: 100%;
}
.video .swiper-wrapper .id_test_video {
  width: 100%;
}
/* .title {
  display: flex;
  padding: 0.32rem 0;
  justify-content: center;
  height: 0.34rem;
  align-items: center;
}
.title span {
  color: rgba(252, 64, 74, 1);
  font-size: 0.28rem;
  padding: 0.02rem 0.32rem;
  line-height: 1;
  font-weight: bold;
}
.title img {
  width: 0.46rem;
  height: 0.06rem;
} */
.noCart {
  /* margin-top: 0.17rem;
  padding-top: 0.1rem; */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.noCart .pictrue {
  width: 4rem;
  height: 3rem;
  /* margin: 46% auto 0.5rem auto; */
}

.noCart .pictrue img {
  width: 100%;
  height: 100%;
}
.noCart .txt {
  font-size: 0.24rem;
  color: rgba(0, 0, 0, 0.4);
  text-align: center;
  letter-spacing: 0.01rem;
}
.cantClick {
  pointer-events: none;
}
.acea-row .flexStart {
  justify-content: flex-start;
}
.acea-row .row-between-wrapper .cangetMoney {
  margin-left: 0.2rem;
  border: 0.02rem solid rgba(255, 85, 104, 1);
  height: 0.32rem;
  box-sizing: border-box;
}
.acea-row .row-between-wrapper .flexDiv {
  margin-left: 0.2rem;
  border: 0.02rem solid rgba(255, 85, 104, 1);
  height: 0.32rem;
  box-sizing: border-box;
}
.acea-row .row-between-wrapper .flexDiv img {
  float: left;
  margin: 0;
  width: 0.48rem;
  height: 0.32rem;
  margin-left: -0.02rem;
  margin-top: -0.02rem;
}
.acea-row .row-between-wrapper .flexDiv span {
  float: left;
  line-height: 0.28rem;
  font-size: 0.24rem;
  padding-right: 0.04rem;
  color: #ff5568;
}
.acea-row .allMai {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.22rem;
  color: #aaa;
  margin-top: 0.12rem;
}
.acea-row .allMai .cangetMoney {
  font-size: 0.24rem;
  line-height: 1;
  padding: 0.16rem 0;
  width: auto;
  /* height: 0.56rem; */
  background: rgba(252, 64, 74, 1);
  color: rgba(255, 255, 255, 1);
  border-radius: 0.56rem;
  min-width: 1.72rem;
  text-align: center;
}
.acea-row .allMai .maidian {
  cursor: pointer;
  position: relative;
  width: 1.26rem;
  height: 0.56rem;
  box-sizing: border-box;
  border-radius: 0.56rem;
  border: 0.01rem solid rgba(0, 0, 0, 0.2);
  text-align: left;
  padding-left: 0.26rem;
  line-height: 0.54rem;
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.24rem;
}
.acea-row .allMai .maidian img {
  position: absolute;
  width: 0.24rem;
  right: 0.2rem;
  top: 0.14rem;
}
.productList .list .item .pictrue .img {
  width: 0.48rem;
  height: 0.48rem;
  position: absolute;
  top: 0.14rem;
  left: 0.14rem;
}

.productList .list .item1 .pictrue {
  width: 1.8rem;
  height: 1.8rem;
  margin-right: 0.3rem;
  border-radius: 0.16rem;
  overflow: hidden;
  border: 0.02rem solid rgba(0, 0, 0, 0.1);
}
.bottomDiv {
  width: 100%;
  position: fixed;
  bottom: 0;
  height: 1.12rem;
  box-shadow: 0px -1px 4px 0px rgba(0, 0, 0, 0.11);
  background: #fff;
}
.bottomDiv .leftDiv {
  float: left;
  height: 0.4rem;
  margin: 0.36rem 0;
  width: 50%;
  box-sizing: border-box;
  border-right: rgba(0, 0, 0, 0.1) 0.02rem solid;
}
.bottomDiv .leftDiv img {
  width: 0.32rem;
  height: 0.32rem;
  margin-top: 0.04rem;
  float: left;
  margin-left: 1rem;
  margin-right: 0.18rem;
}
.bottomDiv .leftDiv span {
  font-size: 0.28rem;
}
.bottomDiv .rightDiv {
  float: left;
  height: 0.4rem;
  margin: 0.36rem 0;
  width: 50%;
  box-sizing: border-box;
}
.bottomDiv .rightDiv img {
  width: 0.32rem;
  height: 0.32rem;
  margin-top: 0.04rem;
  float: left;
  margin-left: 1.08rem;
  margin-right: 0.18rem;
}
.bottomDiv .rightDiv span {
  font-size: 0.28rem;
}
.newBeansTop {
  width: 100%;
  margin: 0.26rem 0.3rem 0;
  height: 2.62rem;
  background: url("../../assets/images/myBeans.png") 0 0 no-repeat;
  background-size: 92% 2.62rem;
  /* background-position: center center; */
  text-align: left;
  padding: 0.54rem 0 0 0.3rem;
  position: relative;
  /* box-sizing: border-box; */
}
.newBeansTop img {
  /* position: absolute;
    top: 0.46rem;
    right: 0.9rem;
    width: 0.3rem;
    height: 0.3rem; */
}
.newBeansTop .isContainer {
  color: rgba(255, 255, 255, 1);
  font-size: 0.28rem;
  line-height: 0.4rem;
  font-weight: 600;
}
.newBeansTop .isContainer .real {
  font-size: 0.8rem;
  line-height: 1.12rem;
  padding-top: 0.24rem;
  font-weight: 600;
}
.newBeansTop .isContainer .isFont {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.24rem;
}
.isContainer p:first-child {
  display: flex;
  align-items: center;
}
.isContainer p:first-child img {
  width: 0.3rem;
  height: 0.3rem;
  margin-left: 4.18rem;
  /* margin-right: 0.3rem; */
}
.newBeansTop .isRecord {
  position: absolute;
  width: 1.76rem;
  height: 0.56rem;
  box-shadow: 0rem 0rem 0.26rem 0rem rgba(33, 29, 30, 0.05),
    0rem 0rem 0.08rem 0rem rgba(99, 2, 2, 0.28);
  border-radius: 0.36rem;
  border: solid 1px rgba(255, 255, 255, 1);
  right: 0.9rem;
  bottom: 0.5rem;
  line-height: 0.58rem;
  text-align: center;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
  font-size: 0.26rem;
  text-shadow: 0px 0px 0px rgba(33, 29, 30, 0.05);
}
.productList .list .item1 {
  width: 100%;
}
.list .item .totalPrice {
  font-size: 0.26rem;
  color: #282828;
  text-align: right;
  margin: 0 0.3rem 0 0.3rem;
  padding: 0 0 0.3rem 0;
  overflow: hidden;
  border-bottom: 0.02rem solid rgba(0, 0, 0, 0.1);
}
.list .item .totalPrice span {
  float: left;
}
.list .item .totalPrice .all {
  padding-left: 2.4rem;
  font-size: 0.24rem;
  color: rgba(0, 0, 0, 0.5);
  line-height: 0.34rem;
  width: auto;
}
.list .item .totalPrice .heji {
  float: right;
  padding-right: 0.08rem;
  font-size: 0.2rem;
  line-height: 0.34rem;
  color: rgba(0, 0, 0, 0.5);
}
.list .item .totalPrice .money {
  font-size: 0.3rem;
  font-weight: 500;
  float: right;
  color: rgba(0, 0, 0, 1);
  line-height: 0.34rem;
}
.toastDownload {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 100;
}
.toastDownload .modela {
  position: absolute;
  width: 6.22rem;
  height: auto;
  margin-left: 0.64rem;
  top: 50%;
  transform: translateY(-1.26rem);
  background: #fff;
  font-size: 0.28rem;
  border-radius: 0.16rem;
}
.toastDownload .modela h1 {
  margin-top: 0.64rem;
  font-size: 0.34rem;
  font-weight: bold;
  color: rgba(51, 51, 51, 1);
  padding: 0 0.48rem;
  margin-bottom: 0.64rem;
  text-align: center;
}
.toastDownload .modela p {
  color: rgba(0, 0, 0, 0.5);
  line-height: 1;
  text-align: center;
  font-size: 0.32rem;
  padding: 0 0.48rem;
  padding-top: 0.64rem;
}
.toastDownload .modela div {
  border-top: 0.01rem solid rgba(0, 0, 0, 0.2);
  color: rgba(68, 115, 225, 1);
  font-size: 0.32rem;
  height: auto;
  line-height: 1;
  text-align: center;
  padding: 0.36rem 0;
  font-weight: 500;
}
</style>
